<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>权限列表</title>
		<#include "../include/base.ftl">
	</head>
	<body>
		<table id="permission-list-box" class="easyui-datagrid" style="width:100%;height:650px;" toolbar="#permission-list-btn"
				title="权限列表" iconCls="icon-save" url="permission/list_data" singleSelect=true
				rownumbers="true" pagination="true" pageSize=10  pageList=[10,20,30,40,50]  pageNumber=1>
			<thead>
				<tr>
					<th field="id" width="80" hidden=true>ID</th>
					<th field="menuName" width="150" formatter="formatMenuName">所属模块</th>
					<th field="permissionName" width="150">名称</th>
					<th field="permissionCode" width="200" align="center">编号</th>
					<th field="createUser" width="120" align="center">创建人</th>
					<th field="createTime" width="150" align="center">创建日期</th>
					<th field="updateUser" width="120" align="center">修改人</th>
					<th field="updateTime" width="150" align="center">修改日期</th>
				</tr>
			</thead>
		</table>
		
		<div id="permission-list-btn" class="search-box">
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:showAddBox();">添加</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="javascript:showEditBox();">编辑</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:deletePermission();">刪除</a>
			&nbsp;&nbsp;
			<span class="search-label">权限名称:</span>
			<input id="permissionName" class="easyui-textbox search-input">
			<span class="search-label">编号:</span>
			<input id="permissionCode" class="easyui-textbox search-input">
			<span class="search-label">模块:</span>
			<select id="menuIdSearch" class="easyui-combotree search-input">
			</select>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch()">查询</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-reload" plain="true" onclick="resetSearchBox()">重置</a>
		</div>
		
		<div id="edit-permission-box" class="easyui-window add-box" title="权限信息维护" style="width:500px;height:300px;display:none;left:60px;top:50px;background:#fafafa;"
		        closed="true" modal="true" collapsible="false" minimizable="false" maximizable="false" draggable="false" resizable="false">  
		    <form action="permission/save_permission" method="post" id="edit-permission-form" autocomplete="off">
	    		<table class="form-table">
        	 	<tr>
					<th align="right" style="width:65px">权限名称:</th>
					<td>
					    <input type="text" id="editPermissionName" name="permissionName"  class="easyui-textbox add-input" data-options="required:true" >
					    <font color="red">*</font>
					    <input type="hidden" name="id" id="editId"/>
					</td>
				</tr>
				<tr>
					<th align="right">权限代码:</th>
					<td>
					    <input type="text" id="editPermissionCode" name="permissionCode" class="easyui-textbox add-input" data-options="required:true" >				 
					    <font color="red">*</font>
					</td>
				</tr>
				<tr>
					<th align="right">所属模块:</th>
					<td>
						<select class="easyui-combotree add-input" name="menu.id" id="editMenuId" data-options="validType:'comboxRequired'">
    					</select>
					</td>
				</tr>
			</table>
		    	<br/>
		    	<div class="form-buttons">
		    		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" onclick="javascript:submitSavePermission();">提交</a>
		    		&nbsp;&nbsp;&nbsp;
					<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#edit-permission-box').dialog('close');">关闭</a>
		    	</div>
		    </form>  
		</div> 
		
		<script type="text/javascript" src="${request.contextPath}/style/web/js/portal-permission.js"></script>
	</body>
</html>